package cn.com.klun.tjy.other.zkUsed;

import java.util.ArrayList;
import java.util.List;

public class TaskCache {
    private List<String> onGingTask = new ArrayList<>();

    private volatile static TaskCache taskObject;
    private TaskCache(){}
    // 多线程安全+双重校验锁 + 懒汉式
    public static TaskCache getInstance(){
        if(taskObject == null){
            synchronized (TaskCache.class){
                if(taskObject == null){
                    taskObject = new TaskCache();
                }
            }
        }
        return taskObject;
    }

    public List<String> getOnGingTask() {
        return onGingTask;
    }

    public void setOnGingTask(List<String> onGingTask) {
        this.onGingTask = onGingTask;
    }
}
